1 using System.Collections;
2 using
System.Collections.Generic;
3 using
UnityEngine;
4
5 public
class DestructionMoveScript : MonoBehaviour {
6
7     
public Rigidbody2D rb;
8
9     
private float moveSpeed = -4f;
10
11     
void Start () {
12         rb = GetComponent<Rigidbody2D>();
13     }
14     
15     
void Update () {
16         rb.velocity = transform.right * moveSpeed;
17     }
18 }



Trò chơi Halloween vui nhộn trong UNITY Engine 10.796 lượt xem

Gõ tìm kiếm nhanh...